If query.return_type is not one we want, binding_compose_params() is
not called, and so params remains a NULL pointer. However, the code was
then unconditionally iterating it regardless. Don't if it is still NULL.
CID
1452218 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
15. var_deref_op: Dereferencing null pointer params.
else
handled = TRUE;
- for (i = 0; i < query.n_params + 1; i++)
- g_value_unset (¶ms[i]);
- g_free (params);
+ if (params != NULL)
+ {
+ for (i = 0; i < query.n_params + 1; i++)
+ g_value_unset (¶ms[i]);
+
+ g_free (params);
+ }
if (entry->destroyed)
break;